package cn.gson.oasys.controller.AoaDiscussListControler;

import cn.gson.oasys.pojo.AoaReplyList;
import cn.gson.oasys.service.AoaDiscussList.AoaReplyListService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by Administrator on 2020/12/4.
 */
@Controller
public class AoaReplyListController {
    @Resource
    private AoaReplyListService service;

    //获取discussId获取相应的回复列表
    @RequestMapping("getAllReplyList")
    @ResponseBody
    public List<AoaReplyList> getAllReplyList(Long discussId){
        List<AoaReplyList> replyList = service.getAoaReplyListByDicussId(discussId);
        return replyList;
    }

    @RequestMapping("getAllReplyByUserName")
    @ResponseBody
    public List<AoaReplyList> getAllReplyByUserName(String userName){
        List<AoaReplyList> list = service.selectAllReplyByUserName(userName);
        return list;
    }


}
